home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
doom
/
quake2.zip
/
TF1_2SRC.ZIP
/
QUAKE
/
FORTRESS
/
SOURCE
/
DEFS.QC
< prev
next >
Wrap
Text File
|
1996-09-09
|
41KB
|
1,214 lines
/*
==============================================================================
SOURCE FOR GLOBALVARS_T C STRUCTURE
==============================================================================
*/
//
// system globals
//
entity self;
entity other;
entity world;
float time;
float frametime;
float force_retouch; // force all entities to touch triggers
// next frame. this is needed because
// non-moving things don't normally scan
// for triggers, and when a trigger is
// created (like a teleport trigger), it
// needs to catch everything.
// decremented each frame, so set to 2
// to guarantee everything is touched
string mapname;
float deathmatch;
float coop;
float teamplay;
float serverflags; // propagated from level to level, used to
// keep track of completed episodes
float total_secrets;
float total_monsters;
float found_secrets; // number of secrets found
float killed_monsters; // number of monsters killed
// spawnparms are used to encode information about clients across server
// level changes
float parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
//
// global variables set by built in functions
//
vector v_forward, v_up, v_right; // set by makevectors()
// set by traceline / tracebox
float trace_allsolid;
float trace_startsolid;
float trace_fraction;
vector trace_endpos;
vector trace_plane_normal;
float trace_plane_dist;
entity trace_ent;
float trace_inopen;
float trace_inwater;
entity msg_entity; // destination of single entity writes
//
// required prog functions
//
void() main; // only for testing
void() StartFrame;
void() PlayerPreThink;
void() PlayerPostThink;
void() ClientKill;
void() ClientConnect;
void() PutClientInServer; // call after setting the parm1... parms
void() ClientDisconnect;
void() SetNewParms; // called when a client first connects to
// a server. sets parms so they can be
// saved off for restarts
void() SetChangeParms; // call to set parms for self so they can
// be saved for a level transition
//================================================
void end_sys_globals; // flag for structure dumping
//================================================
/*
==============================================================================
SOURCE FOR ENTVARS_T C STRUCTURE
==============================================================================
*/
//
// system fields (*** = do not set in prog code, maintained by C code)
//
.float modelindex; // *** model index in the precached list
.vector absmin, absmax; // *** origin + mins / maxs
.float ltime; // local time for entity
.float movetype;
.float solid;
.vector origin; // ***
.vector oldorigin; // ***
.vector velocity;
.vector angles;
.vector avelocity;
.vector punchangle; // temp angle adjust from damage or recoil
.string classname; // spawn function
.string model;
.float frame;
.float skin;
.float effects;
.vector mins, maxs; // bounding box extents reletive to origin
.vector size; // maxs - mins
.void() touch;
.void() use;
.void() think;
.void() blocked; // for doors or plats, called when can't push other
.float nextthink;
.entity groundentity;
// stats
.float health;
.float frags;
.float weapon; // one of the IT_SHOTGUN, etc flags
.string weaponmodel;
.float weaponframe;
.float currentammo;
.float ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
.float items; // bit flags
.float takedamage;
.entity chain;
.float deadflag;
.vector view_ofs; // add to origin to get eye point
.float button0; // fire
.float button1; // use
.float button2; // jump
.float impulse; // weapon changes
.float fixangle;
.vector v_angle; // view / targeting angle for players
.float idealpitch; // calculated pitch angle for lookup up slopes
.string netname;
.entity enemy;
.float flags;
.float colormap;
.float team;
.float max_health; // players maximum health is stored here
.float teleport_time; // don't back up
.float armortype; // save this fraction of incoming damage
.float armorvalue;
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
.float watertype; // a contents value
.float ideal_yaw;
.float yaw_speed;
.entity aiment;
.entity goalentity; // a movetarget or an enemy
.float spawnflags;
.string target;
.string targetname;
// damage is accumulated through a frame. and sent as one single
// message, so the super shotgun doesn't generate huge messages
.float dmg_take;
.float dmg_save;
.entity dmg_inflictor;
.entity owner; // who launched a missile
.vector movedir; // mostly for doors, but also used for waterjump
.string message; // trigger messages
.float sounds; // either a cd track number or sound number
.string noise, noise1, noise2, noise3; // contains names of wavs to play
//================================================
void end_sys_fields; // flag for structure dumping
//================================================
/*
==============================================================================
VARS NOT REFERENCED BY C CODE
==============================================================================
*/
//
// constants
//
float FALSE = 0;
float TRUE = 1;
// edict.flags
float FL_FLY = 1;
float FL_SWIM = 2;
float FL_CLIENT = 8; // set for all client edicts
float FL_INWATER = 16; // for enter / leave water splash
float FL_MONSTER = 32;
float FL_GODMODE = 64; // player cheat
float FL_NOTARGET = 128; // player cheat
float FL_ITEM = 256; // extra wide size for bonus items
float FL_ONGROUND = 512; // standing on something
float FL_PARTIALGROUND = 1024; // not all corners are valid
float FL_WATERJUMP = 2048; // player jumping out of water
float FL_JUMPRELEASED = 4096; // for jump debouncing
// edict.movetype values
float MOVETYPE_NONE = 0; // never moves
//float MOVETYPE_ANGLENOCLIP = 1;
//float MOVETYPE_ANGLECLIP = 2;
float MOVETYPE_WALK = 3; // players only
float MOVETYPE_STEP = 4; // discrete, not real time unless fall
float MOVETYPE_FLY = 5;
float MOVETYPE_TOSS = 6; // gravity
float MOVETYPE_PUSH = 7; // no clip to world, push and crush
float MOVETYPE_NOCLIP = 8;
float MOVETYPE_FLYMISSILE = 9; // fly with extra size against monsters
float MOVETYPE_BOUNCE = 10;
float MOVETYPE_BOUNCEMISSILE = 11; // bounce with extra size
// edict.solid values
float SOLID_NOT = 0; // no interaction with other objects
float SOLID_TRIGGER = 1; // touch on edge, but not blocking
float SOLID_BBOX = 2; // touch on edge, block
float SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
float SOLID_BSP = 4; // bsp clip, touch on edge, block
// range values
float RANGE_MELEE = 0;
float RANGE_NEAR = 1;
float RANGE_MID = 2;
float RANGE_FAR = 3;
// deadflag values
float DEAD_NO = 0;
float DEAD_DYING = 1;
float DEAD_DEAD = 2;
float DEAD_RESPAWNABLE = 3;
// takedamage values
float DAMAGE_NO = 0;
float DAMAGE_YES = 1;
float DAMAGE_AIM = 2;
// items
float IT_AXE = 4096;
float IT_SHOTGUN = 1;
float IT_SUPER_SHOTGUN = 2;
float IT_NAILGUN = 4;
float IT_SUPER_NAILGUN = 8;
float IT_GRENADE_LAUNCHER = 16;
float IT_ROCKET_LAUNCHER = 32;
float IT_LIGHTNING = 64;
float IT_EXTRA_WEAPON = 128;
float IT_SHELLS = 256;
float IT_NAILS = 512;
float IT_ROCKETS = 1024;
float IT_CELLS = 2048;
float IT_ARMOR1 = 8192;
float IT_ARMOR2 = 16384;
float IT_ARMOR3 = 32768;
float IT_SUPERHEALTH = 65536;
float IT_KEY1 = 131072;
float IT_KEY2 = 262144;
float IT_INVISIBILITY = 524288;
float IT_INVULNERABILITY = 1048576;
float IT_SUIT = 2097152;
float IT_QUAD = 4194304;
// point content values
float CONTENT_EMPTY = -1;
float CONTENT_SOLID = -2;
float CONTENT_WATER = -3;
float CONTENT_SLIME = -4;
float CONTENT_LAVA = -5;
float CONTENT_SKY = -6;
float STATE_TOP = 0;
float STATE_BOTTOM = 1;
float STATE_UP = 2;
float STATE_DOWN = 3;
vector VEC_ORIGIN = '0 0 0';
vector VEC_HULL_MIN = '-16 -16 -24';
vector VEC_HULL_MAX = '16 16 32';
vector VEC_HULL2_MIN = '-32 -32 -24';
vector VEC_HULL2_MAX = '32 32 64';
// protocol bytes
float SVC_TEMPENTITY = 23;
float SVC_KILLEDMONSTER = 27;
float SVC_FOUNDSECRET = 28;
float SVC_INTERMISSION = 30;
float SVC_FINALE = 31;
float SVC_CDTRACK = 32;
float SVC_SELLSCREEN = 33;
float TE_SPIKE = 0;
float TE_SUPERSPIKE = 1;
float TE_GUNSHOT = 2;
float TE_EXPLOSION = 3;
float TE_TAREXPLOSION = 4;
float TE_LIGHTNING1 = 5;
float TE_LIGHTNING2 = 6;
float TE_WIZSPIKE = 7;
float TE_KNIGHTSPIKE = 8;
float TE_LIGHTNING3 = 9;
float TE_LAVASPLASH = 10;
float TE_TELEPORT = 11;
// sound channels
// channel 0 never willingly overrides
// other channels (1-7) allways override a playing sound on that channel
float CHAN_AUTO = 0;
float CHAN_WEAPON = 1;
float CHAN_VOICE = 2;
float CHAN_ITEM = 3;
float CHAN_BODY = 4;
float ATTN_NONE = 0;
float ATTN_NORM = 1;
float ATTN_IDLE = 2;
float ATTN_STATIC = 3;
// update types
float UPDATE_GENERAL = 0;
float UPDATE_STATIC = 1;
float UPDATE_BINARY = 2;
float UPDATE_TEMP = 3;
// entity effects
float EF_BRIGHTFIELD = 1;
float EF_MUZZLEFLASH = 2;
float EF_BRIGHTLIGHT = 4;
float EF_DIMLIGHT = 8;
// messages
float MSG_BROADCAST = 0; // unreliable to all
float MSG_ONE = 1; // reliable to one (msg_entity)
float MSG_ALL = 2; // reliable to all
float MSG_INIT = 3; // write to the init string
//================================================
//
// globals
//
float movedist;
float gameover; // set when a rule exits
string string_null; // null string, nothing should be held here
float empty_float;
entity newmis; // launch_spike sets this after spawning it
entity activator; // the entity that activated a trigger or brush
entity damage_attacker; // set by T_Damage
float framecount;
float skill;
//================================================
//
// world fields (FIXME: make globals)
//
.string wad;
.string map;
.float worldtype; // 0=medieval 1=metal 2=base
//================================================
.string killtarget;
//
// quakeed fields
//
.float light_lev; // not used by game, but parsed by light util
.float style;
//
// monster ai
//
.void() th_stand;
.void() th_walk;
.void() th_run;
.void() th_missile;
.void() th_melee;
.void(entity attacker, float damage) th_pain;
.void() th_die;
.entity oldenemy; // mad at this player before taking damage
.float speed;
.float lefty;
.float search_time;
.float attack_state;
float AS_STRAIGHT = 1;
float AS_SLIDING = 2;
float AS_MELEE = 3;
float AS_MISSILE = 4;
//
// player only fields
//
.float walkframe;
.float attack_finished;
.float pain_finished;
.float invincible_finished;
.float invisible_finished;
.float super_damage_finished;
.float radsuit_finished;
.float invincible_time, invincible_sound;
.float invisible_time, invisible_sound;
.float super_time, super_sound;
.float rad_time;
.float fly_sound;
.float axhitme;
.float show_hostile; // set to time+0.2 whenever a client fires a
// weapon or takes damage. Used to alert
// monsters that otherwise would let the player go
.float jump_flag; // player jump flag
.float swim_flag; // player swimming sound flag
.float air_finished; // when time > air_finished, start drowning
.float bubble_count; // keeps track of the number of bubbles
.string deathtype; // keeps track of how the player died
//
// object stuff
//
.string mdl;
.vector mangle; // angle at start
.vector oldorigin; // only used by secret door
.float t_length, t_width;
//
// doors, etc
//
.vector dest, dest1, dest2;
.float wait; // time from firing to restarting
.float delay; // time from activation to firing
.entity trigger_field; // door's trigger entity
.string noise4;
//
// monsters
//
.float pausetime;
.entity movetarget;
//
// doors
//
.float aflag;
.float dmg; // damage done by door when hit
//
// misc
//
.float cnt; // misc flag
//
// subs
//
.void() think1;
.vector finaldest, finalangle;
//
// triggers
//
.float count; // for counting triggers
//
// plats / doors / buttons
//
.float lip;
.float state;
.vector pos1, pos2; // top and bottom positions
.float height;
//
// sounds
//
.float waitmin, waitmax;
.float distance;
.float volume;
//===========================================================================
//
// builtin functions
//
void(vector ang) makevectors = #1; // sets v_forward, etc globals
void(entity e, vector o) setorigin = #2;
void(entity e, string m) setmodel = #3; // set movetype and solid first
void(entity e, vector min, vector max) setsize = #4;
// #5 was removed
void() break = #6;
float() random = #7; // returns 0 - 1
void(entity e, float chan, string samp, float vol, float atten) sound = #8;
vector(vector v) normalize = #9;
void(string e) error = #10;
void(string e) objerror = #11;
float(vector v) vlen = #12;
float(vector v) vectoyaw = #13;
entity() spawn = #14;
void(entity e) remove = #15;
// sets trace_* globals
// nomonsters can be:
// An entity will also be ignored for testing if forent == test,
// forent->owner == test, or test->owner == forent
// a forent of world is ignored
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
entity() checkclient = #17; // returns a client to look for
entity(entity start, .string fld, string match) find = #18;
string(string s) precache_sound = #19;
string(string s) precache_model = #20;
void(entity client, string s)stuffcmd = #21;
entity(vector org, float rad) findradius = #22;
void(string s) bprint = #23;
void(entity client, string s) sprint = #24;
void(string s) dprint = #25;
string(float f) ftos = #26;
string(vector v) vtos = #27;
void() coredump = #28; // prints all edicts
void() traceon = #29; // turns statment trace on
void() traceoff = #30;
void(entity e) eprint = #31; // prints an entire edict
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
// #33 was removed
float(float yaw, float dist) droptofloor= #34; // TRUE if landed on floor
void(float style, string value) lightstyle = #35;
float(float v) rint = #36; // round to nearest int
float(float v) floor = #37; // largest integer <= v
float(float v) ceil = #38; // smallest integer >= v
// #39 was removed
float(entity e) checkbottom = #40; // true if self is on ground
float(vector v) pointcontents = #41; // returns a CONTENT_*
// #42 was removed
float(float f) fabs = #43;
vector(entity e, float speed) aim = #44; // returns the shooting vector
float(string s) cvar = #45; // return cvar.value
void(string s) localcmd = #46; // put string into local que
entity(entity e) nextent = #47; // for looping through all ents
void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
void() ChangeYaw = #49; // turn towards self.ideal_yaw
// at self.yaw_speed
// #50 was removed
vector(vector v) vectoangles = #51;
//
// direct client message generation
//
void(float to, float f) WriteByte = #52;
void(float to, float f) WriteChar = #53;
void(float to, float f) WriteShort = #54;
void(float to, float f) WriteLong = #55;
void(float to, float f) WriteCoord = #56;
void(float to, float f) WriteAngle = #57;
void(float to, string s) WriteString = #58;
void(float to, entity s) WriteEntity = #59;
//
// broadcast client message generation
//
// void(float f) bWriteByte = #59;
// void(float f) bWriteChar = #60;
// void(float f) bWriteShort = #61;
// void(float f) bWriteLong = #62;
// void(float f) bWriteCoord = #63;
// void(float f) bWriteAngle = #64;
// void(string s) bWriteString = #65;
// void(entity e) bWriteEntity = #66;
void(float step) movetogoal = #67;
string(string s) precache_file = #68; // no effect except for -copy
void(entity e) makestatic = #69;
void(string s) changelevel = #70;
//#71 was removed
void(string var, string val) cvar_set = #72; // sets cvar.value
void(entity client, string s) centerprint = #73; // sprint, but in middle
void(vector pos, string samp, float vol, float atten) ambientsound = #74;
string(string s) precache_model2 = #75; // registered version only
string(string s) precache_sound2 = #76; // registered version only
string(string s) precache_file2 = #77; // registered version only
void(entity e) setspawnparms = #78; // set parm1... to the
// values at level start
// for coop respawn
//============================================================================
//
// subs.qc
//
void(vector tdest, float tspeed, void() func) SUB_CalcMove;
void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
void() SUB_CalcMoveDone;
void() SUB_CalcAngleMoveDone;
void() SUB_Null;
void() SUB_UseTargets;
void() SUB_Remove;
//
// combat.qc
//
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
float (entity e, float healamount, float ignore) T_Heal; // health function
float(entity targ, entity inflictor) CanDamage;
//===========================================================================
// TEAMFORTRESS Defs
//===========================================================================\
.float playerclass;
.float last_impulse; // The previous impulse command from this player
.float armorclass; // Type of armor being worn
.float tf_items; // Another flag for player items
.float tf_items_flags; // Flags for the player items
.float no_grenades_1; // Number of grenades of type 1 being carried
.float no_grenades_2; // Number of grenades of type 2 being carried
.float tp_grenades_1; // 1st type of grenades being carried
.float tp_grenades_2; // 2nd type of grenades being carried
// TeamFortress State Flags
.float tfstate; // State flags for TeamFortress
float TFSTATE_GRENPRIMED= 1; // Whether the player has a primed grenade
float TFSTATE_RELOADING = 2; // Whether the player is reloading
float TFSTATE_ALTKILL = 4; // TRUE if killed with a weapon not in self.weapon
float TFSTATE_RANDOMPC = 8; // Whether Playerclass is random, new one each respawn
float TFSTATE_INFECTED = 16; // set when player is infected by the bioweapon
.entity linked_list; // Used just like chain. Has to be separate so
// it doesn't interfere with chain. See T_RadiusScan
.entity observer_list; // Used by undefined classes, see TF_MovePlayer
float TF_TD_IGNOREARMOUR = 1; // Bypasses the armour of the target
float TF_TD_NOTTEAM = 2; // Doesn't damage a team member
float TF_TD_NOTSELF = 4; // Doesn't damage self
// See TF_T_Damage (in combat.qc)
// Playerclass handling variables
.float maxammo_shells; // Class holding details
.float maxammo_nails;
.float maxammo_cells;
.float maxammo_rockets;
.float items_allowed;
.float secondary_items_allowed;
.float armor_allowed;
.float maxarmor;
.float maxfbspeed; // Maximum forward/back speed
.float maxstrafespeed; // Maximum side speed
.float weaponmode; // Used for multiple mode weapons
.float altkillweapon; // ID of the weapon killed by if TFSTATE_ALTKILL is TRUE
.float motd; // Used to display MOTD
/*==================================================*/
/* Toggleable Game Settings */
/*==================================================*/
float toggleflags; // toggleable flags
float TFLAG_SKIN = 1; // Classkin/Multiskin Bit
float TFLAG_CLASS_PERSIST = 2; // Persistent Classes Bit
float TFLAG_CHEATCHECK = 4; // Cheatchecking Bit
float TFLAG_FORTRESSMAP = 8; // FortressMap Bit
float TFLAG_RESPAWNDELAY = 16; // RespawnDelay bit
float TFLAG_RESPAWNDELAY2 = 32; // extra delay options
float TFLAG_AUTOTEAM = 64; // sets whether players are automatically placed in teams
float TFLAG_FIRSTENTRY = 256; // Used to determine the first time toggleflags is set
// In a map. Cannot be toggled by players.
float TF_RESPAWNDELAY1 = 5; // seconds of waiting before player can respawn
float TF_RESPAWNDELAY2 = 10; // seconds of waiting before player can respawn
float TF_RESPAWNDELAY3 = 20; // seconds of waiting before player can respawn
// FortressMap stuff
float team1col; // Colours for each of the 4 teams
float team2col; // If there's enough demand, we'll
float team3col; // allow more than four teams...
float team4col;
float team1score; // Goal Score of each team
float team2score;
float team3score;
float team4score;
.float team_no; // The team you belong to
// Defines for the playerclass
float PC_UNDEFINED = 0;
float PC_SCOUT = 1;
float PC_SNIPER = 2;
float PC_SOLDIER = 3;
float PC_DEMOMAN = 4;
float PC_MEDIC = 5;
float PC_HVYWEAP = 6;
// PC_RANDOM _MUST_ be the second last class
float PC_RANDOM = 7; // Random playerclass
float PC_LASTCLASS = 8; // Use this as the high-boundary for any loops
// through the playerclass.
/*==================================================*/
/* Impulse Defines */
/*==================================================*/
// defines for the impulse commands : Added to PC_??? to get impulse to use
// if this clashes with your own impulses, just change this value, not the PC_??
float TF_CHANGEPC = 100;
// The Pre-impulse for help
float TF_HELP = 254;
float TF_HELP_GENERAL = 1;
float TF_HELP_CLASS = 2;
float TF_HELP_WEAPON = 3;
float TF_HELP_ITEM = 4;
float TF_HELP_PREIMP = 5;
float TF_HELP_PREIMP_SHOW = 6;
float TF_HELP_SKIN = 7;
float TF_HELP_IMP_SHOW = 8;
float TF_HELP_TEAM = 9;
float TF_HELP_TOGGLE = 10;
float TF_INVENTORY = 253;
float TF_SHOWTF = 244;
// Team Impulses
float TF_TEAM = 245; // Pre-impulse for Team functions
float TF_TEAM_SCORES = 253; // Impulse to display team scores
float TF_TEAM_LIST = 254; // Impulse to display the players in each team.
// Team impulses need to start at the top, since the
// range of values from 1-TM_MAX_NO are used to set the player's team.
// Grenade Impulses
float TF_GRENADE_1 = 252; // Prime grenade type 1
float TF_GRENADE_2 = 251; // Prime grenade type 2
float TF_GRENADE_T = 250; // Throw primed grenade
// Multiskin Impulses
float TF_MULTISKIN = 202; // Multiskin Pre-Impulse
float TF_SKIN_NEXT = 200; // If Multiskin is on, these cycle
float TF_SKIN_PREV = 201; // through the skins.
// Impulses for new items
float TF_SCAN = 249; // Pre-impulse for scanner
float TF_SCAN_ENEMY = 1; // } Impulses to toggle scanning of these entity types
float TF_SCAN_FRIENDLY = 2; // } Like all scanner impulses, they only work after the Pre-Impulse
float TF_DETPACK = 248; // Pre-impulse for Detpack
float TF_PB_DETONATE = 247; // Detonate Pipebombs
// Alias check to see whether they already have the aliases
float TF_ALIAS_CHECK = 13;
/*==================================================*/
/* Team Defines */
/*==================================================*/
float TM_MAX_NO = 4; // Max number of teams. Simply changing this value isn't enough.
// A new global to hold new team colors is needed, and more flags
// in the spawnpoint spawnflags may need to be used.
// Basically, don't change this unless you know what you're doing :)
/*==================================================*/
/* Toggleable Game Seting Defines */
/*==================================================*/
float TF_TOGGLE = 246; // Toggle Pre-Impulse
float TF_TOGGLE_SKIN = 1; // Toggle skin setting
float TF_TOGGLE_CLASS_PERSIST = 2; // Toggle Class Persistence between lvls
float TF_TOGGLE_CHEATCHECK = 3; // Toggle Checking for cheats
float TF_TOGGLE_FORTRESSMAP = 4; // Toggle usage of FortressMap. (See the readme.txt)
float TF_TOGGLE_RESPAWNDELAY = 5; // Toggle usages
float TF_TOGGLE_AUTOTEAM = 6; // Toggle automatic placement of players in teams
/*==================================================*/
/* New Weapon Defines */
/*==================================================*/
float NIT_SNIPER_RIFLE = 1;
float NIT_AUTO_RIFLE = 2;
float NIT_MEDIKIT = 4;
float NIT_DETPACK = 8;
float NIT_ASSAULT_CANNON = 16;
float NIT_BIOWEAPON = 32;
/*==================================================*/
/* New Weapon Related Defines */
/*==================================================*/
// shots per reload - 1
float RE_SHOTGUN = 7;
float RE_SUPER_SHOTGUN = 7;
//float RE_NAILGUN = 39;
//float RE_SUPER_NAILGUN = 39;
float RE_GRENADE_LAUNCHER = 5;
float RE_ROCKET_LAUNCHER = 3;
// reload times
float RE_SHOTGUN_TIME = 2;
float RE_SUPER_SHOTGUN_TIME = 3;
//float RE_NAILGUN_TIME = 4;
//float RE_SUPER_NAILGUN_TIME = 6;
float RE_GRENADE_LAUNCHER_TIME = 4;
float RE_ROCKET_LAUNCHER_TIME = 5;
float RE_ASSAULT_CANNON_TIME = 6;
// Maximum velocity you can move and fire the Sniper Rifle
float NIT_SNIPER_RIFLE_MAX_MOVE = 50;
// Amount medikit heals per hit
float NIT_MEDIKIT_HEAL = 10;
.float ammo_medikit; // Ammo used for the NIT_MEDIKIT
.float maxammo_medikit;
// Time taken to set a Detpack
float NIT_DETPACK_SETTIME = 4; // Time it takes to set a Detpack
float NIT_DETPACK_SIZE = 2000;
.float ammo_detpack;
.float maxammo_detpack;
// Grenades
float GR_PRIMETIME = 3;
float GR_TYPE_NONE = 0;
float GR_TYPE_NORMAL = 1;
float GR_TYPE_CONCUSSION = 2;
float GR_TYPE_NAIL = 3;
float GR_TYPE_MIRV = 4;
float GR_TYPE_MIRV_NO = 15; // Number of Mirvs a Mirv Grenade breaks into
// Defines for WeaponMode
float GL_NORMAL = 0;
float GL_PIPEBOMB = 1;
// Defines for Alternative Weapon Kill
float AK_GRENADE = 0;
float AK_GRENADE_NAIL = 1;
float AK_GRENADE_MIRV = 2;
float AK_DETPACK = 3;
float AK_BIOWEAPON = 4;
float AK_MISSILE = 5;
float AK_ORG_GRENADE = 6;
// Defines for Concussion Grenade
float GR_CONCUSS_TIME = 5;
float GR_CONCUSS_DEC = 20;
/*==================================================*/
/* New Items */
/*==================================================*/
float NIT_SCANNER = 1;
/*==================================================*/
/* New Item Flags */
/*==================================================*/
float NIT_SCANNER_ENEMY = 1; // Detect enemies
float NIT_SCANNER_FRIENDLY = 2; // Detect friendlies (team members)
float NIT_SCANNER_MOVEMENT = 4; // Motion detection. Only report moving entities.
/*==================================================*/
/* New Item Related Defines */
/*==================================================*/
float NIT_SCANNER_POWER = 50; // The amount of power spent on a scan with the scanner
// is multiplied by this to get the scanrange.
float NIT_SCANNER_MAXCELL = 50; // The maximum number of cells than can be used in one scan
float NIT_SCANNER_MIN_MOVEMENT = 50; // The minimum velocity an entity must have to be detected
// by scanners that only detect movement
/*==================================================*/
/* Variables used for New Weapons and Reloading */
/*==================================================*/
// used only when .weapon == IT_EXTRA_WEAPON
.float secondary_items; // contains all the additional weapons
.float secondary_weapon; // contains the currently used secondary weapon
.float reload_shotgun;
.float reload_super_shotgun;
//.float reload_nailgun;
//.float reload_super_nailgun;
.float reload_grenade_launcher;
.float reload_rocket_launcher;
// Assault Cannon
.float heat;
// Team Color Cheat Checking
.float immune_to_check;
// Armor Classes : Use the spawnflags for the Armor Type.
float AT_NORMAL = 1792; // Default spawnflags for Armor. armorclass = 0 for this armor
float AT_SAVESHOT = 32768; // Kevlar : Reduces shotgun damage by 25%
float AT_SAVENAIL = 65536; // Wood :) : Reduces nail damage by 25%
float AT_SAVEEXPLOSION = 131072; // Blast : Reduces explosion damage by 25%
float AT_SAVESHOTNAIL = 262144; // Adamantite : Reduces nail and shotgun damage by 10%
// Class Details for SCOUT
float PC_SCOUT_SKIN = 26; // Skin for this class when Classkin is on.
float PC_SCOUT_MAXHEALTH = 75; // Maximum Health Level
float PC_SCOUT_MAXSPEED = 600; // Maximum movement speed
float PC_SCOUT_MAXSTRAFESPEED = 600; // Maximum strafing movement speed
float PC_SCOUT_MAXARMOR = 50; // Maximum Armor Level, of any armor class
float PC_SCOUT_INITARMOR = 25; // Armor level when respawned
float PC_SCOUT_MAXARMORTYPE = 0.3; // Maximum level of Armor absorption
float PC_SCOUT_INITARMORTYPE = 0.3; // Absorption Level of armor when respawned
float PC_SCOUT_ARMORCLASSES = 98304; // AT_SAVESHOT | AT_SAVENAIL <-Armor Classes allowed for this class
float PC_SCOUT_INITARMORCLASS = 0; // Armorclass worn when respawned
float PC_SCOUT_WEAPONS = 4101; // IT_AXE | IT_SHOTGUN | IT_NAILGUN; <- Weapons allowed
float PC_SCOUT_MAXAMMO_SHOT = 50; // Maximum amount of shot ammo this class can carry
float PC_SCOUT_MAXAMMO_NAIL = 200; // Maximum amount of nail ammo this class can carry
float PC_SCOUT_MAXAMMO_CELL = 100; // Maximum amount of cell ammo this class can carry
float PC_SCOUT_MAXAMMO_ROCKET = 0; // Maximum amount of rocket ammo this class can carry
float PC_SCOUT_INITAMMO_SHOT = 25; // Amount of shot ammo this class has when respawned
float PC_SCOUT_INITAMMO_NAIL = 100; // Amount of nail ammo this class has when respawned
float PC_SCOUT_INITAMMO_CELL = 50; // Amount of cell ammo this class has when respawned
float PC_SCOUT_INITAMMO_ROCKET = 0; // Amount of rocket ammo this class has when respawned
float PC_SCOUT_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL <- 1st Type of Grenade this class has
float PC_SCOUT_GRENADE_TYPE_2 = 2; // GR_TYPE_CONCUSSION <- 2nd Type of Grenade this class has
float PC_SCOUT_GRENADE_INIT_1 = 2; // Number of grenades of Type 1 this class has when respawned
float PC_SCOUT_GRENADE_INIT_2 = 2; // Number of grenades of Type 2 this class has when respawned
float PC_SCOUT_TF_ITEMS = 1; // NIT_SCANNER <- TeamFortress Items this class has
float PC_SCOUT_MOTION_MIN_I = 0.5; // < Short range
float PC_SCOUT_MOTION_MIN_MOVE = 50; // Minimum vlen of player velocity to be picked up by motion detector
// Class Details for SNIPER
float PC_SNIPER_SKIN = 2;
float PC_SNIPER_MAXHEALTH = 90;
float PC_SNIPER_MAXSPEED = 300;
float PC_SNIPER_MAXSTRAFESPEED = 300;
float PC_SNIPER_MAXARMOR = 50;
float PC_SNIPER_INITARMOR = 0;
float PC_SNIPER_MAXARMORTYPE = 0.3;
float PC_SNIPER_INITARMORTYPE = 0.3;
float PC_SNIPER_ARMORCLASSES = 360448; // AT_SAVESHOT | AT_SAVENAIL | AT_SAVESHOTNAIL
float PC_SNIPER_INITARMORCLASS = 0;
float PC_SNIPER_WEAPONS = 4228; // IT_EXTRA_WEAPON | IT_AXE | IT_NAILGUN;
float PC_SNIPER_MAXAMMO_SHOT = 75;
float PC_SNIPER_MAXAMMO_NAIL = 100;
float PC_SNIPER_MAXAMMO_CELL = 0;
float PC_SNIPER_MAXAMMO_ROCKET = 0;
float PC_SNIPER_INITAMMO_SHOT = 50;
float PC_SNIPER_INITAMMO_NAIL = 50;
float PC_SNIPER_INITAMMO_CELL = 0;
float PC_SNIPER_INITAMMO_ROCKET = 0;
float PC_SNIPER_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL
float PC_SNIPER_GRENADE_TYPE_2 = 0;
float PC_SNIPER_GRENADE_INIT_1 = 2;
float PC_SNIPER_GRENADE_INIT_2 = 0;
float PC_SNIPER_TF_ITEMS = 0;
// Class Details for SOLDIER
float PC_SOLDIER_SKIN = 6;
float PC_SOLDIER_MAXHEALTH = 100;
float PC_SOLDIER_MAXSPEED = 200;
float PC_SOLDIER_MAXSTRAFESPEED = 200;
float PC_SOLDIER_MAXARMOR = 200;
float PC_SOLDIER_INITARMOR = 100;
float PC_SOLDIER_MAXARMORTYPE = 0.8;
float PC_SOLDIER_INITARMORTYPE = 0.8;
float PC_SOLDIER_ARMORCLASSES = 491520; // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
float PC_SOLDIER_INITARMORCLASS = 0;
float PC_SOLDIER_WEAPONS = 4139; // IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_SUPER_NAILGUN | IT_ROCKET_LAUNCHER;
float PC_SOLDIER_MAXAMMO_SHOT = 100;
float PC_SOLDIER_MAXAMMO_NAIL = 200;
float PC_SOLDIER_MAXAMMO_CELL = 100;
float PC_SOLDIER_MAXAMMO_ROCKET = 50;
float PC_SOLDIER_INITAMMO_SHOT = 50;
float PC_SOLDIER_INITAMMO_NAIL = 100;
float PC_SOLDIER_INITAMMO_CELL = 50;
float PC_SOLDIER_INITAMMO_ROCKET= 10;
float PC_SOLDIER_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL
float PC_SOLDIER_GRENADE_TYPE_2 = 3; // GR_TYPE_NAIL
float PC_SOLDIER_GRENADE_INIT_1 = 4;
float PC_SOLDIER_GRENADE_INIT_2 = 4;
float PC_SOLDIER_TF_ITEMS = 0;
// Class Details for DEMOLITION MAN
float PC_DEMOMAN_SKIN = 22;
float PC_DEMOMAN_MAXHEALTH = 90;
float PC_DEMOMAN_MAXSPEED = 300;
float PC_DEMOMAN_MAXSTRAFESPEED = 300;
float PC_DEMOMAN_MAXARMOR = 100;
float PC_DEMOMAN_INITARMOR = 50;
float PC_DEMOMAN_MAXARMORTYPE = 0.6;
float PC_DEMOMAN_INITARMORTYPE = 0.6;
float PC_DEMOMAN_ARMORCLASSES = 491520; // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
float PC_DEMOMAN_INITARMORCLASS = 0;
float PC_DEMOMAN_WEAPONS = 4113; // IT_AXE | IT_SHOTGUN | IT_GRENADE_LAUNCHER;
float PC_DEMOMAN_MAXAMMO_SHOT = 75;
float PC_DEMOMAN_MAXAMMO_NAIL = 0;
float PC_DEMOMAN_MAXAMMO_CELL = 0;
float PC_DEMOMAN_MAXAMMO_ROCKET = 50;
float PC_DEMOMAN_MAXAMMO_DETPACK = 2;
float PC_DEMOMAN_INITAMMO_SHOT = 30;
float PC_DEMOMAN_INITAMMO_NAIL = 0;
float PC_DEMOMAN_INITAMMO_CELL = 0;
float PC_DEMOMAN_INITAMMO_ROCKET = 20;
float PC_DEMOMAN_INITAMMO_DETPACK= 1;
float PC_DEMOMAN_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL
float PC_DEMOMAN_GRENADE_TYPE_2 = 4; // GR_TYPE_MIRV
float PC_DEMOMAN_GRENADE_INIT_1 = 6;
float PC_DEMOMAN_GRENADE_INIT_2 = 4;
float PC_DEMOMAN_TF_ITEMS = 0;
// Class Details for COMBAT MEDIC
float PC_MEDIC_SKIN = 15;
float PC_MEDIC_MAXHEALTH = 90;
float PC_MEDIC_MAXSPEED = 300;
float PC_MEDIC_MAXSTRAFESPEED = 300;
float PC_MEDIC_MAXARMOR = 150;
float PC_MEDIC_INITARMOR = 50;
float PC_MEDIC_MAXARMORTYPE = 0.6;
float PC_MEDIC_INITARMORTYPE = 0.6;
float PC_MEDIC_ARMORCLASSES = 360448; // AT_SAVESHOT | AT_SAVENAIL | AT_SAVESHOTNAIL
float PC_MEDIC_INITARMORCLASS = 0;
float PC_MEDIC_WEAPONS = 139; // IT_EXTRA_WEAPON | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_SUPER_NAILGUN;
float PC_MEDIC_MAXAMMO_SHOT = 75;
float PC_MEDIC_MAXAMMO_NAIL = 150;
float PC_MEDIC_MAXAMMO_CELL = 0;
float PC_MEDIC_MAXAMMO_ROCKET = 0;
float PC_MEDIC_MAXAMMO_MEDIKIT = 100;
float PC_MEDIC_INITAMMO_SHOT = 50;
float PC_MEDIC_INITAMMO_NAIL = 50;
float PC_MEDIC_INITAMMO_CELL = 0;
float PC_MEDIC_INITAMMO_ROCKET = 0;
float PC_MEDIC_INITAMMO_MEDIKIT = 50;
float PC_MEDIC_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL
float PC_MEDIC_GRENADE_TYPE_2 = 2; // GR_TYPE_CONCUSSION
float PC_MEDIC_GRENADE_INIT_1 = 3;
float PC_MEDIC_GRENADE_INIT_2 = 2;
float PC_MEDIC_TF_ITEMS = 0;
float PC_MEDIC_REGEN_TIME = 5; // Number of seconds between each regen.
float PC_MEDIC_REGEN_AMOUNT = 5; // Amount of health regenerated each regen.
// Class Details for HVYWEAP
float PC_HVYWEAP_SKIN = 29;
float PC_HVYWEAP_MAXHEALTH = 100;
float PC_HVYWEAP_MAXSPEED = 150;
float PC_HVYWEAP_MAXSTRAFESPEED = 150;
float PC_HVYWEAP_MAXARMOR = 300;
float PC_HVYWEAP_INITARMOR = 150;
float PC_HVYWEAP_MAXARMORTYPE = 0.8;
float PC_HVYWEAP_INITARMORTYPE = 0.8;
float PC_HVYWEAP_ARMORCLASSES = 491520; // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
float PC_HVYWEAP_INITARMORCLASS = 0;
float PC_HVYWEAP_WEAPONS = 4227; // IT_EXTRA_WEAPON | IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN
float PC_HVYWEAP_MAXAMMO_SHOT = 200;
float PC_HVYWEAP_MAXAMMO_NAIL = 200;
float PC_HVYWEAP_MAXAMMO_CELL = 50;
float PC_HVYWEAP_MAXAMMO_ROCKET = 0;
float PC_HVYWEAP_INITAMMO_SHOT = 200;
float PC_HVYWEAP_INITAMMO_NAIL = 100;
float PC_HVYWEAP_INITAMMO_CELL = 20;
float PC_HVYWEAP_INITAMMO_ROCKET= 0;
float PC_HVYWEAP_GRENADE_TYPE_1 = 1; // GR_TYPE_NORMAL
float PC_HVYWEAP_GRENADE_TYPE_2 = 4; // GR_TYPE_MIRV
float PC_HVYWEAP_GRENADE_INIT_1 = 4;
float PC_HVYWEAP_GRENADE_INIT_2 = 1;
float PC_HVYWEAP_TF_ITEMS = 0;
/*==========================================================================*/
/* TEAMFORTRESS GOALS */
/*==========================================================================*/
// For all these defines, see the tfortmap.txt that came with the zip
// for complete descriptions.
// Defines for Goal Activation types : goal_activation (in goals)
float TFGA_TOUCH = 1; // Activated when touched
float TFGA_TOUCH_DETPACK = 2; // Activated when touched by a detpack explosion
float TFGA_ITEM = 4; // Activating player must have a specific GoalItem : items_allowed
float TFGA_CLASS = 8; // Activating player must be of a specific class : playerclass
float TFGA_TEAM =16; // Activating player must be of a specific team : teamno
float TFGA_TIMER_GOAL =32; // This is a Timer Goal. : search_time
// Defines for Goal Result types : goal_result
float TFGR_SINGLE = 1; // Goal can only be activated once
float TFGR_RESPAWN = 2; // Goal respawns after a time
float TFGR_ITEM = 4; // Goal gives the player a GoalItem : items
float TFGR_ITEM_REMOVE = 8; // Goal removes an item from the player : axhitme
float TFGR_GOAL_ACTIVATE = 16; // Goal activates another goal : impulse
float TFGR_GOAL_INACTIVATE = 32; // Goal makes another goal inactive : distance
float TFGR_GOAL_REMOVE = 64; // Goal removes a goal : waitmin
float TFGR_GOAL_RESTORE = 128; // Goal restores a goal : waitmax
float TFGR_NO_ACT_BONUS = 256; // Any Goals activated by this one don't give their bonuses
float TFGR_ENDGAME = 512; // Goal fires Intermission, displays scores, and ends level
// Defines for Goal Group Result types : goal_group
float TFGG_ACTIVATE = 1; // If all goals is a group are active, Activate another Goal : height, last_impulse
float TFGG_ACTIVATE_ALL = 2; // Activate all goals in a group : aflag
float TFGG_INACTIVATE_ALL = 4; // Inactivate all goals in a group : dmg
float TFGG_REMOVE_ALL = 8; // Remove all goals in a group : cnt
float TFGG_RESTORE_ALL =16; // Restore all goals in a group : pausetime
// Defines for Goal Item types, : goal_activation (in items)
float TFGI_GLOW = 1; // Players carrying this GoalItem will glow
float TFGI_SLOW = 2; // Players carrying this GoalItem will move at half-speed
float TFGI_DROP = 4; // Players dying with this item will drop it
float TFGI_RETURN_DROP = 8; // Return if a player with it dies
float TFGI_RETURN_GOAL = 16; // Return if a player with it has it removed by a goal's activation
float TFGI_RETURN_REMOVE = 32; // Return if it is removed by TFGI_REMOVE
float TFGI_RESTORE_GOAL = 64; // Restore a goal when this item is returned : impulse
float TFGI_ITEM = 128; // Collecting player must have a specific GoalItem : items_allowed
float TFGI_CLASS = 256; // Collecting player must be of a specific class : playerclass
float TFGI_TEAM = 512; // Collecting player must be of a specific team : teamno
float TFGI_NOEXIST =1024; // Doesn't exist until given to a player.
float TFGI_REMOVE =2048; // Remove if left untouched for 2 minutes after being dropped
// Defines for Goal States
float TFGS_ACTIVE = 1;
float TFGS_INACTIVE = 2;
float TFGS_REMOVED = 3;
// Variables used in the Goals
.float goal_no; // Goal number of this goal
.float group_no; // Goal group this goal is in
.float goal_state; // State of this goal
// Goal Activation details
.float goal_activation; // Bitfields. Determines how this goal is activated
.float goal_result; // Bitfields. Determines the results of activation
.float goal_group; // Bitfields. Determines how groups are affected by activation of this goal
// global, number of teams supported by the map
float number_of_teams;
/*==================================================*/
/* Multiskin Defines */
/*==================================================*/
// Whenever you download a newer version of Multiskin with
// more skins, change this value to the number of skins
// in the new player.mdl
float MS_MAX_SKIN = 32;
/*==================================================*/
/* Server Details */
/*==================================================*/
// if you're going to run this as a server on the net,
// you may want to change this value of this variable to 1.
// This will make TeamFortress only use files which come
// with quake.
float IS_NET_SERVER = 0;